home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Extensions… / PostScript Extension ƒ / PS Extension.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-09  |  2.3 KB  |  78 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: PS Extension.h
  4.  
  5.     C header file for a printing extension.
  6.  
  7.     Dave Hersey
  8.     Apple Developer Technical Support
  9.  
  10.     (Based on the "Extension Shell" sample.)
  11.  
  12.     12/01/92 - dmh - Created.
  13.      4/26/93 - dmh - Updated to use recommended approach
  14.                       to global data initialization.
  15.      9/05/93 - dmh - Updated to b2.
  16.                     - Fixed minor problem with highlighting
  17.                      of editText panel items.
  18.                    - Switched to Exception.h assertion stuff
  19.                      for error checking.
  20.      9/08/93 - dmh - Modified to override
  21.                       GXPostScriptDoPageSetup.
  22.                    - Added a "PS " before the file names.
  23.                    - Changed creator type.
  24.  
  25.     (Note: labels are in the Mark menu.)
  26.     
  27. __________________________________________________________*/
  28.  
  29. #include <Types.h>
  30. #include <Errors.h>
  31. #include <Resources.h>
  32. #include <ToolUtils.h>
  33. #include <math routines.h>
  34. #include <Exceptions.h>
  35. #include <graphics routines.h>
  36. #include <graphics toolbox.h>
  37. #include <Collections.h>
  38. #include <Messages.h>
  39. #include <PrintingDrivers.h>
  40. #include <PrintingManager.h>
  41. #include <PrintingMessages.h>
  42.  
  43.  
  44. #define kCreator                    'GPxt'            /* Our creator type.            */
  45. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  46.  
  47. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  48. #define kExtensionTurnedOff            0                /* We're turned on.                */
  49. #define kExtensionTurnedOn            1                /* We're turned off.            */
  50.  
  51. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  52.  
  53.  
  54. typedef struct ExtensionCollection                    /* This is our collection type.    */
  55. {
  56.     char    extTurnedOn;                            /* On/off panel item value.        */
  57.     char    fillByte;
  58. } ExtensionCollection;
  59.  
  60.  
  61. // Prototypes:
  62.  
  63. extern    long A5Size (void);                            /* We need these to set up        */
  64. extern    void A5Init (void *);                        /* our A5 world.                */
  65.  
  66. OSErr    InitGlobalData(void);
  67. OSErr    NewInitialize(void);
  68. OSErr    NewShutDown(void);
  69. OSErr    NewPSDoPageSetup(gxFormat aFormat, long pageNum,
  70.                          gxPostScriptImageDataHdl aDataHdl);
  71. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  72. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  73. OSErr    SetUpPrintPanel(void);
  74. OSErr    StoreJobCollectionItem(void *collectItem, long collectSize, OSType collectType,
  75.                                short collectID, Boolean newItem);
  76. OSErr    GetJobCollectionItem(void *collectItem, long *collectSize,
  77.                              OSType collectType, short collectID);
  78.